useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'protoStoreSales3.bin')
		select('FileChooser1',  commonBits.stdCopybookDir() + 'StoreSales3.protocomp')


		click('Edit1')
		assert_p('JTreeTable', 'Content', '[[, , 20, Store: 20], [, , 59, Store: 59], [, , 166, Store: 166], [, , 184, Store: 184]]')
		select_menu('View>>Show Proto Definition')
##		assert_p('JTreeTable', 'Content', '[[, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 4, LABEL_REQUIRED, TYPE_INT64, , , ], [, , , , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ], [, , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Product, , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , ], [, , , , , , , , ], [, , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Deptartment, , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Order, , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , ], [, , , , , , , , ]]')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , ], [, , , , , , , , ], [, , StoreSales3.proto, , , , , , ], [, , , , , , , , ], [, , Product, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 4, LABEL_REQUIRED, TYPE_INT64, , , ], [, , Order, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , Summary, , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , Deptartment, , , , , , ], [, , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Product, , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , ], [, , Store, , , , , , ], [, , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Deptartment, , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Order, , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , ], [, , , , , , , , ]]')
		select('LayoutCombo', 'Prefered')
##		assert_p('JTreeTable', 'Content', '[[, , , , , , , , , ], [, , , , , , , , , ], [, , StoreSales3.proto, net.sf.RecordEditor.ProtoBuf.re.Test.Sales3, [], , , , , ], [, , , , , , , , , ], [, , Product, , , , , , , ], [, , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , saleDate, 2, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , quantity, 3, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , price, 4, LABEL_REQUIRED, TYPE_INT64, , , , ], [, , Order, , , , , , , ], [, , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , Summary, , , , , , , ], [, , , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , Deptartment, , , , , , , ], [, , , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Product, , , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , , ], [, , Store, , , , , , , ], [, , , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Deptartment, , , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Order, , , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , , ], [, , , , , , SPEED, , , ]]')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , , , ], [, , , , , , , , , , ], [, , StoreSales3.proto, net.sf.RecordEditor.ProtoBuf.re.Test.Sales3, [], [], [], , , , ], [, , , , , , , , , , ], [, , Product, , , , , , , , ], [, , , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , saleDate, 2, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , quantity, 3, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , price, 4, LABEL_REQUIRED, TYPE_INT64, , , , , ], [, , Order, , , , , , , , ], [, , , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , Summary, , , , , , , , ], [, , , , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , Deptartment, , , , , , , , ], [, , , , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Product, , , , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , , , ], [, , Store, , , , , , , , ], [, , , , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Deptartment, , , , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Order, , , , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.Sales3.Summary, , , , ], [, , , , , , SPEED, , , , ]]')

	close()
